package com.axjy.controller;

import com.axjy.pojo.User;
import com.axjy.service.UserService;
import com.axjy.util.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/sys/user")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/search")
    public Result search(Integer page,Integer limit,User user){
      Page<User> userPage=  userService.searchPage(page,limit,user);
      return Result.success(userPage);
    }
}
